<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title></title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">

	<link rel="stylesheet" href="/Public/layui/css/layui.css" media="all">  


</head>

<body style="padding: 10px;">

  <fieldset class="layui-elem-field site-demo-button">
    <div>
      <a href="<?php echo U('Phpss/phpOut');?>" class="layui-btn layui-btn-primary">导出</a>
      <a class="layui-btn layui-btn-primary" id="up">导入</a>


    </div>
  </fieldset>
  <table class="layui-table">
    <colgroup>
      <col width="150">
      <col width="200">
      <col>
    </colgroup>
    <thead>
      <tr>
        <th>ID</th>
        <th>用户ID</th>
        <th>登录设备</th>
        <th>登录时间</th>
        <th>登录ip</th>

      </tr>
    </thead>
    <tbody>
      <?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vol): $mod = ($i % 2 );++$i;?><tr>
          <td><?php echo ($vol["id"]); ?></td>
          <td><?php echo ($vol["uid"]); ?></td>
          <td>

            <?php if($vol['client'] == 1): ?>安卓
              <?php elseif($vol['client'] == 2): ?>
              苹果
              <?php else: ?>
              电脑<?php endif; ?>

          </td>
          <td><?php echo (date("Y-m-d H:i:s",$vol["add_time"])); ?></td>
          <td><?php echo ($vol["ip"]); ?></td>
        </tr><?php endforeach; endif; else: echo "" ;endif; ?>


    </tbody>
  </table>

  <br><br><br>


	<script src="/Public/layui/layui.js"></script>
  
  <script>
    layui.use(['form', 'upload'], function () {
      var $ = layui.jquery;
      var form = layui.form;
      var upload = layui.upload;

      upload.render({
        elem: '#up' //绑定元素
        , url: '/Admin/Phpss/phpLoad' //上传接口
        , accept: 'file'
        , done: function (res) {
          //上传完毕回调
        }
        , error: function () {
          //请求异常回调
        }
      });
    })
  </script>

</body>

</html>